package com.pulanit.pangu.admin.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 功能描述
 *
 * @author: 天鸣
 * @date: 2024-02-29
 */
@Component
@ConfigurationProperties(prefix = "pangu.upload")
public class PanguConfig {

    /** 上传路径 */
    private static String profile;


    public static String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        PanguConfig.profile = profile;
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile();
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }
}
